package cn.stronglink.asset.module.dam.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.baomidou.mybatisplus.plugins.Page;

import cn.stronglink.asset.model.DeviceType;
import cn.stronglink.asset.model.ItAsset;
import cn.stronglink.asset.model.RfidState;
import cn.stronglink.asset.module.assetmanage.itasset.vo.ItAssetVo;
import cn.stronglink.asset.module.dam.entity.dev.AssetInfo;
import cn.stronglink.asset.module.dam.entity.dev.DeviceTypeVo;
import cn.stronglink.asset.module.dam.entity.dev.RackInfo;
import cn.stronglink.asset.terminal.bjc.model.AssetModelVO;

public interface DamAssetMapper {

	List<ItAssetVo> qryAssetListByRackCode(Page<ItAssetVo> page,@Param(value="rackCode")String rackCode);

	ItAssetVo qryAssetInfo(@Param(value="rfid")String rfid);

	RackInfo qryRackInfoByDevNo(@Param(value="rackCode")String rackCode);

	DeviceTypeVo qryDevice(@Param(value="deviceCode")String deviceCode);

	List<DeviceType> qryCollectionDevice(@Param(value="rackId")Long rackId);

	ItAsset qryRackInfoByName(@Param(value="rackName")String rackName);

	int updateDevice(DeviceType deviceType);

	int insertDevice(DeviceType deviceType);

	DeviceType qryDamDeviceByRackId(@Param(value="rackId")long rackId);

	void deleteDeviceByRackIdAndRackConverCode(@Param(value="rackConverCode") String rackConverCode);

	List<AssetInfo> qryAssetListByRackConverCode(@Param(value="rackConverCode")String rackConverCode);

	List<RfidState> qryRfidStateByRackConverCode(@Param(value="rackConverCode")String rackConverCode);

	void updateAssetRfid(@Param(value="assetId")String assetId,@Param(value="rfid") String rfid);

	void updateAssetUInfo(@Param(value="assetId")String assetId, @Param(value="startU")int startU);

	void unBindAssetRfid(@Param(value="rfid")String rfid);

	void unBindStartUInSameRanck(@Param(value="assetId")String assetId,@Param(value="startU")int startU);

	List<AssetModelVO> qryAssetModelListByRackConverCode(@Param(value="rackConverCode")String rackConverCode);

	void updateAssetModelUHeight(@Param(value="assetModelId")String assetModelId,@Param(value="uHeight") int uHeight);

	void updateAssetEndU(@Param(value="assetModelId")String assetModelId, @Param(value="uHeight")int uHeight);
}
